import request from '@/utils/request';

export function getUsers(params) {
    return request({
      url: '/users',
      method: 'get',
      params
    })
  }

export const addUser = (data) => {
    return request({
      url: '/users',
      method: 'post',
      data
    })
  }
  

export const updateUser = (data) => {
    return request({
      url: `/users/${data.id}`,
      method: 'put',
      data
    })
  }


export const deleteUser = (id) => {
    return request({
      url: `/users/${id}`,
      method: 'delete'
    })
}